/*    

    bobbietalk - a visual programming environment for toy robotics

    Copyright (C) 2013  Roberto Tiella

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/
package bobbietalk.gui;

/**
 *
 * @author roberto
 */
public class RobotConfiguration {

    private String leftMotorPort;
    private String rightMotorPort;
    private String otherMotorPort;
    private String touch1SensorPort;
    private String touch2SensorPort;
    private String colorSensorPort;
    private String distanceSensorPort;

    public String getLeftMotorPort() {
        return leftMotorPort;
    }

    public void setLeftMotorPort(String leftMotorPort) {
        this.leftMotorPort = leftMotorPort;
    }

    public String getRightMotorPort() {
        return rightMotorPort;
    }

    public void setRightMotorPort(String rightMotorPort) {
        this.rightMotorPort = rightMotorPort;
    }

    public String getOtherMotorPort() {
        return otherMotorPort;
    }

    public void setOtherMotorPort(String otherMotorPort) {
        this.otherMotorPort = otherMotorPort;
    }

    public String getTouch1SensorPort() {
        return touch1SensorPort;
    }

    public void setTouch1SensorPort(String touch1SensorPort) {
        this.touch1SensorPort = touch1SensorPort;
    }

    public String getTouch2SensorPort() {
        return touch2SensorPort;
    }

    public void setTouch2SensorPort(String touch2SensorPort) {
        this.touch2SensorPort = touch2SensorPort;
    }

    public String getColorSensorPort() {
        return colorSensorPort;
    }

    public void setColorSensorPort(String colorSensorPort) {
        this.colorSensorPort = colorSensorPort;
    }

    public String getDistanceSensorPort() {
        return distanceSensorPort;
    }

    public void setDistanceSensorPort(String distanceSensorPort) {
        this.distanceSensorPort = distanceSensorPort;
    }

    public String getTouchSensorPort(String sensorNumber) {

        int sn = Integer.parseInt(sensorNumber);
        String res = null;

        switch (sn) {
            case 1:
                res = getTouch1SensorPort();
                break;
            case 2:
                res = getTouch2SensorPort();
                break;
        }

        return res;

    }
}
